<?php
namespace app\model;
use think\Model;

class OrderModel extends Model
{
    protected $globalScope = ['status'];
    protected $name = 'order';
    public function scopeStatus($query)
    {
        $query->where('status',1)->where('sell_time','<',time());
    }
}